
<ion-view class="checkWork-home-view" view-title="不良品检验">
    <ion-header-bar  class="bar-subheader">
        <im-card-header card-title="单品信息"></im-card-header>
        <div class="im-flow-container">
            <im-master-item class="im-flow-item" master-name="芯片" 
                master-value="{{data.one.Barcode}}">
            </im-master-item>
            <im-master-item class="im-flow-item" master-name="型号" 
                master-value="{{data.one.ItemMasterCode}}">
            </im-master-item>
            <im-master-item class="im-flow-item" master-name="尺寸" 
                master-value="{{data.one.DescSeg1}}">
            </im-master-item>
            <im-master-item class="im-flow-item" master-name="外观" 
                master-value="{{data.one.DescSeg2}}">
            </im-master-item>
            <im-master-item class="im-flow-item" master-name="批次" 
                master-value="{{data.one.MOLotNumber}}">
            </im-master-item>
            <im-master-item class="im-flow-item" master-name="工单" 
                master-value="{{data.one.MOCode}}">
            </im-master-item>
        </div>
        <im-card-header card-title="缺陷信息">
            <!-- <span class="demo-qc-status">不合格</span> -->
            <span class="demo-qc-status-ok" ng-if="data.badRecords.length==0" >
              合格
            </span>
            <span class="demo-qc-status" ng-if="data.badRecords.length>0" >不合格</span>
        </im-card-header>
    </ion-header-bar>
    <ion-content>
        <div class="im-flow-container">
            <!-- <im-defect-card class="im-flow-item" ng-repeat="item in data.badRecords" 
                bad-type="{{item.BadType}}" bad-pos="item.BadPosition" bad-desc="item.Description" read-flag="false">
            </im-defect-card> -->
            <im-defect-card class="im-flow-item" ng-repeat="record in data.badRecords" 
            defect="record" readonly="false" on-bad-pos="onBadPos(defect)" on-delete="onDelete(defect)" ng-click="changeStatus(record)">
            </im-defect-card>
            <div class="checkWork-add-defect" ng-click="openModal()">
                <i class="icon ion-plus"></i>
            </div>
        </div>
    </ion-content>
    <ion-footer-bar class="checkWork-home-footer">
        <im-pull-right>
            <!-- <button  ng-click="submitData()" class="button checkWork-button-judge">确认</button> -->
            <!-- 让步对应特裁 -->
            <button  ng-disabled="disableJudge" ng-click="submitData(6)" class="button checkWork-button-accept">让步</button>
            <button ng-disabled="disableJudge" ng-click="submitData(4)" class="button checkWork-button-rework">返工</button>
            <button ng-disabled="disableJudge" ng-click="submitData(5)" class="button checkWork-button-reject">报废</button>
            <button ng-disabled="disableJudge" ng-click="submitData(3)" class="button checkWork-button-judge">品质判定</button>

        </im-pull-right>
    </ion-footer-bar>
</ion-view>